wayland: Only set x, y, and modifiers if the pointers are non-NULL
authorKristian Høgsberg <krh@bitplanet.net>
Fri, 11 Feb 2011 22:07:19 +0000 (17:07 -0500)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 11 Feb 2011 22:07:19 +0000 (17:07 -0500)
gdk/wayland/gdkdevice-wayland.c

index 20d28bf4e267c416a4925acbad1c3480d361ca55..2a051de4da69f76156723741b252db7db3d81ada 100644 (file)
@@ -214,9 +214,12 @@ gdk_device_core_window_at_position (GdkDevice       *device,
   GdkWaylandDevice *wd;
 
   wd = GDK_DEVICE_CORE(device)->device;
-  *win_x = wd->surface_x;
-  *win_y = wd->surface_y;
-  *mask = wd->modifiers;
+  if (win_x)
+    *win_x = wd->surface_x;
+  if (win_y)
+    *win_y = wd->surface_y;
+  if (mask)
+    *mask = wd->modifiers;
 
   return wd->pointer_focus;
 }